export const peopleOption = {
    title: {
        show: true,
        text: '园区人数', // 当前写死
        subtext: '', // 当前写死
        top: '42%',//'30%',
        left: '55%',//'47%',
        textAlign: 'center',
        textStyle: {
            fontSize: '14',//'13',
            color: '#fff',
            fontStyle: 'italic',
        },
        subtextStyle: {
            fontSize: '18',//'17',
            color: '#fff',
            fontStyle: 'italic',
            fontWeight: 'bold'
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: '{b}<br/>{c} ({d}%)',
    },
    legend: {
        icon: 'circle',
        itemGap: 15,
        itemWidth: 10,
        itemHeight: 10,
        bottom: '35%',
        //left: 'center',
        orient: 'vertical',
        left: 'left',
        textStyle: {
            fontSize: 12, //字体大小
            fontStyle: 'italic',
            textAlign: 'center',
            lineHeight: 6,//15,
            color: '#fff', //字体颜色
        },
        formatter: (params) => {
        }
    },
    // color: ['#37dcd6', '#528ed9', '#1e7390'],
    color: ['#37dcd6', '#7c00ff', '#007aff'],
    series: [
        {
            type: 'pie',
            radius: ['60%', '75%'],//['51%', '64%'],
            center: ['58%', '57%'],//['50%', '40%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                fontSize: 12,
            },
            itemStyle: {
                borderRadius: 10,
                borderColor: 'rgba(255,255,255,0.3)',
                borderWidth: 1
            },
            emphasis: {
                label: {
                    show: false,
                },
            },
            labelLine: {
                show: false,
            },
            data: [],
        },
    ],
}
export const radarOption = {
    color: ['#D6A525', '#FFE434', '#56A3F1', '#FF917C'],
    title: {
      text: '',
      textStyle:{
            //文字颜色
            color:'#ccc',
            //字体风格,'normal','italic','oblique'
            fontStyle:'normal',
            //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
            fontWeight:'bold',
            //字体系列
            fontFamily:'sans-serif',
            //字体大小
            fontSize:14
        }
    },
    legend: {},
    radar: [
      {
        indicator: [
          { text: '报警处置',max:1000 },
          { text: '值班干警',max:1000 },
          { text: '重点人员',max:1000 },
          { text: '外来人员',max:1000 },
          { text: '安防设备',max:1000 }
        ],
        center: ['50%', '57%'],
        radius: 49,
        startAngle: 90,
        splitNumber: 4,
        shape: 'circle',
        axisName: {
          formatter: '【{value}】',
          color: '#428BD4'
        },
        splitArea: {
          areaStyle: {
            color: ['#77EADF', '#26C3BE', '#64AFE9', '#428BD4'],
            shadowColor: 'rgba(0, 0, 0, 0.7)',
            shadowBlur: 10
          }
        },
        axisLine: {
          lineStyle: {
            color: 'rgba(211, 253, 250, 0.8)'
          }
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(211, 253, 250, 0.8)'
          }
        }
      }
    ],
    series: [
      {
        type: 'radar',
        emphasis: {
          lineStyle: {
            width: 4
          }
        },
        data: [
          {
            value: [600, 600, 700, 700, 900],
            name: '',
            areaStyle: {
              color: 'rgba(255, 228, 52, 0.6)'
            },
            label: {
              show: true,
              color: 'rgba(255, 255, 255, 1)',
              formatter: function (params) {
                return params.value;
              }
            }
          }
        ]
      }
    ]
}

export const carOption = {
    title: {
        show: true,
        text: '停车场1', //车位总数 当前写死
        subtext: '', // 当前写死
        top: '38%',//'30%',
        left: '55%',//'47%',
        textAlign: 'center',
        textStyle: {
            fontSize: '14',//'13',
            color: '#fff',
            fontStyle: 'italic',
        },
        subtextStyle: {
            fontSize: '18',//'17',
            color: '#fff',
            fontStyle: 'italic',
            fontWeight: 'bold'
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: '{b}<br/>{c} ({d}%)',
    },
    legend: {
        icon: 'circle',
        itemGap: 20,
        itemWidth: 10,
        itemHeight: 10,
        //bottom: '1%',
        bottom: '50%',//'-1%',
        //left: 'center',
        left: 'left',
        orient: 'vertical',
        textStyle: {
            fontSize: 12, //字体大小
            fontStyle: 'italic',
            textAlign: 'center',
            lineHeight: 6,//15,
            color: '#fff', //字体颜色
        },
        formatter: (params) => {
        }
    },
    color: ['#CA5B15', '#176fdd'],//['#176fdd', '#4af1f7', '#1e7390'],
    series: [
        {
            type: 'pie',
            radius: ['60%', '75%'],//['51%', '64%'],
            center: ['58%', '57%'],//['50%', '40%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                fontSize: 12,
            },
            itemStyle: {
                borderRadius: 10,
                borderColor: 'rgba(255,255,255,0.3)',
                borderWidth: 1
            },
            emphasis: {
                label: {
                    show: false,
                },
            },
            labelLine: {
                show: false,
            },
            data: [],
        },
    ],
}
export const carOption1 = {
    title: {
        show: true,
        text: '停车场2', //车位总数  当前写死
        subtext: '', // 当前写死
        top: '38%',//'30%',
        left: '55%',//'47%',
        textAlign: 'center',
        textStyle: {
            fontSize: '14',//'13',
            color: '#fff',
            fontStyle: 'italic',
        },
        subtextStyle: {
            fontSize: '18',//'17',
            color: '#fff',
            fontStyle: 'italic',
            fontWeight: 'bold'
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: '{b}<br/>{c} ({d}%)',
    },
    legend: {
        icon: 'circle',
        itemGap: 20,
        itemWidth: 10,
        itemHeight: 10,
        //bottom: '1%',
        bottom: '50%',//'-1%',
        //left: 'center',
        left: 'left',
        orient: 'vertical',
        textStyle: {
            fontSize: 12, //字体大小
            fontStyle: 'italic',
            textAlign: 'center',
            lineHeight: 6,//15,
            color: '#fff', //字体颜色
        },
        formatter: (params) => {
        }
    },
    color: ['#B88815', '#7AA425'],//['#176fdd', '#4af1f7', '#1e7390'],
    series: [
        {
            type: 'pie',
            radius: ['60%', '75%'],//['51%', '64%'],
            center: ['58%', '57%'],//['50%', '40%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                fontSize: 12,
            },
            itemStyle: {
                borderRadius: 10,
                borderColor: 'rgba(255,255,255,0.3)',
                borderWidth: 1
            },
            emphasis: {
                label: {
                    show: false,
                },
            },
            labelLine: {
                show: false,
            },
            data: [],
        },
    ],
}

export const attendanceOption = {
    chart: {
        type: 'pie',
        backgroundColor: 'rgba(255, 255, 255, 0)',
        options3d: {
            enabled: true,
            alpha: 45,
            beta: 0,
        },
        spacingBottom: 15,
    },
    credits: {
        enabled: false, //去掉版权信息
    },
    title: {
        text: '',
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>',
    },
    legend: {
        align: "left", //程度标的目标地位
        verticalAlign: "middle", //垂直标的目标地位
        symbolRadius: 0,
        itemDistance: 15,
        width: 60,
        itemStyle: {
            color: '#fff',
            fontStyle: 'italic',
        },
        // x: 0, //间隔x轴的间隔
        // y: 100 //间隔Y轴的间隔
    },
    // colors: ['#39b96f', '#3c679c', '#42b6c0', '#db6b0d', '#ff575c'],
    colors: ['#39b96f', '#3c679c', '#42b6c0', '#7c00ff', '#e8395d'],
    plotOptions: {
        pie: {
            allowPointSelect: true,
            cursor: 'pointer',
            depth: 25,
            dataLabels: {
                enabled: true,
                softConnector: false,
                style: {
                    color: '#fff',
                    // fontStyle: 'italic',
                    textOutline: "none"
                },
                formatter: function () {
                    if (this.y > 0) {
                        return this.point.name + " " + this.y
                    }
                },
                // format: '{point.name} {point.y}',
            },
            showInLegend: true//重点图例显示
        },
    },
    series: [
        {
            type: 'pie',
            name: '占比',
            size: '100%',
            center: ['55%', '50%'],
            data: [],
        },
    ],
}
export const totalOption = {
    title: {
        show: true,
        text: '告警总数', // 当前写死
        subtext: '', // 当前写死
        top: '30%',
        left: '47%',
        textAlign: 'center',
        textStyle: {
            fontSize: '13',
            color: '#fff',
            fontStyle: 'italic',
        },
        subtextStyle: {
            fontSize: '18',
            color: '#fff',
            fontStyle: 'italic',
            fontWeight: 'bold'
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: '{b}<br/>{c} ({d}%)',
    },
    legend: {
        icon: 'rect',
        itemGap: 10,
        itemWidth: 10,
        itemHeight: 10,
        bottom: '0',
        left: 'center',
        textStyle: {
            fontSize: 10, //字体大小
            fontStyle: 'italic',
            textAlign: 'center',
            lineHeight: 12,
            color: '#fff', //字体颜色
        },
        formatter: (params) => {
        }
    },
    color: ['#8a222c', '#fa7418', '#ffd500', '#2675cc'],
    series: [
        {
            type: 'pie',
            radius: ['50%', '60%'],
            center: ['50%', '40%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                fontSize: 12,
            },
            emphasis: {
                label: {
                    show: false,
                },
            },
            labelLine: {
                show: false,
            },
            data: [],
        },
    ],
}
export const doneOption = {
    title: {
        show: true,
        text: '已处理告警', // 当前写死
        subtext: '', // 当前写死
        top: '30%',
        left: '47%',
        textAlign: 'center',
        textStyle: {
            fontSize: '13',
            color: '#fff',
            fontStyle: 'italic',
        },
        subtextStyle: {
            fontSize: '18',
            color: '#fff',
            fontStyle: 'italic',
            fontWeight: 'bold'
        }
    },
    tooltip: {
        trigger: 'item',
        formatter: '{b}<br/>{c} ({d}%)',
    },
    legend: {
        icon: 'rect',
        itemGap: 10,
        itemWidth: 10,
        itemHeight: 10,
        bottom: '0',
        left: 'center',
        textStyle: {
            fontSize: 10, //字体大小
            fontStyle: 'italic',
            textAlign: 'center',
            lineHeight: 12,
            color: '#fff', //字体颜色
        },
        formatter: (params) => {
        }
    },
    color: ['#8a222c', '#fa7418', '#ffd500', '#2675cc'],
    series: [
        {
            type: 'pie',
            radius: ['50%', '60%'],
            center: ['50%', '40%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                fontSize: 12,
            },
            emphasis: {
                label: {
                    show: false,
                },
            },
            labelLine: {
                show: false,
            },
            data: [],
        },
    ],
}

// 告警事件汇总
export const gatherOption = {
    tooltip: {
        trigger: 'item',
        formatter: '{a} <br/>{b}: {c} ({d}%)'
    },
    legend: {
        data: ['严重', '高', '中', '低'],
        icon: 'rect',
        itemGap: 10,
        itemWidth: 10,
        itemHeight: 10,
        // bottom: '0',
        align: 'left',
        left: '15',
        top: "middle",
        orient: "vertical",
        textStyle: {
            // fontSize: 10, //字体大小
            fontStyle: 'italic',
            textAlign: 'center',
            lineHeight: 12,
            color: '#fff', //字体颜色
        },
    },
    grid: {
        bottom: 0
    },
    color: ['#35b7c3', '#50eccd', '#00a4ff'],
    series: [
        {
            name: '告警事件',
            type: 'pie',
            selectedMode: 'single',
            radius: [0, '40%'],
            label: {
                // position: 'inner',
                fontSize: 12,
                color: '#fff'
            },
            labelLine: {
                // show: false,
                showAbove: true,
                length: '7%',
                // length2: 30
            },
            data: []
        },
        {
            name: '告警事件',
            type: 'pie',
            radius: ['55%', '65%'],
            labelLine: {
                // length: 30,
            },
            label: {
                show: false,
            },
            // color: ['#8a222c', '#fa7418', '#ffd500', '#2675cc']
            itemStyle: {
                color: function (params) {
                    if (params.name == '严重') {
                        return '#8a222c';
                    } else if (params.name == '高') {
                        return '#fa7418';
                    } else if (params.name == '中') {
                        return '#ffd500';
                    } else if (params.name == '低') {
                        return '#2675cc';
                    } else {
                        return '#2675cc';
                    }
                },
            },
            data: []
        }
    ]
}

